package com.ysalliance.getFan.organization.myview.dialog;

import android.app.Dialog;
import android.content.Context;
import android.view.View;
import android.widget.TextView;

import com.ysalliance.getFan.organization.R;


public class ChooseDialog extends Dialog {

    public ChooseDialog(Context context, String left, String right, String content) {
        //使用自定义Dialog样式
        super(context, R.style.custom_dialog_noinput);
        //指定布局
        setContentView(R.layout.dialog_faner_choose);
        //点击外部不可消失   true可消失   false 点击外部不可消失
        setCancelable(true);

        //设置标题
//        TextView titleTv = (TextView) findViewById(R.id.dialog_title_tv);
//        titleTv.setText(title);
        //设置确定取消按键
        TextView tv_left = (TextView) findViewById(R.id.tv_left);
        TextView tv_right = (TextView) findViewById(R.id.tv_right);
        TextView tv_intro = (TextView) findViewById(R.id.tv_intro);
        tv_intro.setText(content);
        if(left!=null){
            tv_left.setText(left);
        }
        if(right!=null){
            tv_right.setText(right);
        }



        tv_left.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View paramView) {
                left();
                //取消
                cancel();
            }
        });

        tv_right.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View paramView) {
                right();
                //取消
                cancel();
            }
        });
    }

    //
    public void left() {
    }

    //
    public void right() {
    }




}
